package com.appkubes.mall.restful.application.goods.category.service.impl;

import com.appkubes.base.core.entity.vo.AppKeyVO;
import com.appkubes.mall.core.entity.MallGoodsCategory;
import com.appkubes.mall.core.service.impl.BaseMallGoodsCategoryServiceImpl;
import com.appkubes.mall.restful.application.goods.category.service.CategoryService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CategoryServiceImpl extends BaseMallGoodsCategoryServiceImpl implements CategoryService {


    @Override
    public List<MallGoodsCategory> getGoodsCategory(AppKeyVO appKeyVO, Integer type) {
        QueryWrapper<MallGoodsCategory> queryWrapper = new QueryWrapper<>();
        MallGoodsCategory entity = new MallGoodsCategory();
        entity.setType(type);
        queryWrapper.setEntity(entity);
        queryWrapper.orderByAsc("sort");
        return this.getBaseMapper().selectList(queryWrapper);

    }


}
